import axios from "axios";

function logout(){
    if(confirm("确定退出登录？")){
        axios.get('/api/auth/logout',{
            headers: {
                '_accessToken_': localStorage.getItem("accessToken")
            }
                
        } 
  ).then((result) => {
            if(result.data.success){
                localStorage.removeItem("accessToken");
                this.$router.replace('/Management');
                return;
            }
            else{
             alert(result.data.msg);
             return;
            }
      
              
          });

}}